home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / MutableAttributeSet.java < prev    next >
Text File  |  1998-06-30  |  3KB  |  99 lines

  1. /*
  2.  * @(#)MutableAttributeSet.java    1.7 98/04/09
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20. package com.sun.java.swing.text;
  21.  
  22. import java.util.Enumeration;
  23.  
  24. /**
  25.  * A generic interface for a mutable collection of unique attributes.
  26.  *
  27.  * Implementations will probably want to provide a constructor of the
  28.  * form:<tt>
  29.  * public XXXAttributeSet(ConstAttributeSet source);</tt>
  30.  *
  31.  * @version 1.7 04/09/98
  32.  */
  33. public interface MutableAttributeSet extends AttributeSet {
  34.  
  35.     /**
  36.      * Creates a new attribute set similar to this one except that it contains
  37.      * an attribute with the given name and value.  The object must be
  38.      * immutable, or not mutated by any client.
  39.      *
  40.      * @param name the name
  41.      * @param value the value
  42.      */
  43.     public void addAttribute(Object name, Object value);
  44.  
  45.     /**
  46.      * Creates a new attribute set similar to this one except that it contains
  47.      * the given attributes and values.
  48.      *
  49.      * @param attributes the set of attributes
  50.      */
  51.     public void addAttributes(AttributeSet attributes);
  52.  
  53.     /**
  54.      * Creates a new attribute set similar to this one except that it contains
  55.      * no attribute with the given name.
  56.      *
  57.      * @param name the attribute name
  58.      */
  59.     public void removeAttribute(Object name);
  60.  
  61.     /**
  62.      * Creates a new attribute set similar to this one except that it contains
  63.      * no attribute with any of the given names.
  64.      *
  65.      * @param names the set of names
  66.      */
  67.     public void removeAttributes(Enumeration names);
  68.  
  69.     /**
  70.      * Creates a new attribute set similar to this one except that it contains
  71.      * no attribute with any of the given names and values.  Existing
  72.      * attributes with the same name and different value will remain.
  73.      *
  74.      * @param attributes the set of attributes
  75.      */
  76.     public void removeAttributes(AttributeSet attributes);
  77.  
  78.     /**
  79.      * Sets the resolving parent.  This is the set
  80.      * of attributes to resolve through if an attribute
  81.      * isn't defined locally. 
  82.      *
  83.      * @param parent the parent
  84.      */
  85.     public void setResolveParent(AttributeSet parent);
  86.  
  87. }
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.